#pragma once
#include "Event.h"

namespace Fysics
{
	class KeyEvent : public Event
	{
	protected:
		int m_KeyCode;
		KeyEvent(int keycode) : m_KeyCode(keycode) 
		{
			AddCategory(EventCategoryGlobal | EventCategoryInput | EventCategoryKeyboard);
		}
	public:
		inline int GetKeyCode() const { return m_KeyCode; }
	};

	class KeyPressedEvent : public KeyEvent
	{
	private:
		bool m_LongClick;
	public:
		KeyPressedEvent(int keycode, bool isLongClick)
			: KeyEvent(keycode), m_LongClick(isLongClick)
		{
		}
		inline bool IsLongClick() const { return m_LongClick; }
		EVENT_TYPE(KeyPressed)
	};

	class KeyReleasedEvent : public KeyEvent
	{
	public:
		KeyReleasedEvent(int keycode) : KeyEvent(keycode) {}

		EVENT_TYPE(KeyReleased)
	};
}